<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>添加汽车</title>
<script type="text/javascript" src="<%=request.getContextPath() %>/frame/jquery-3.6.0.min.js"></script>
<link rel="stylesheet" href="<%=request.getContextPath() %>/frame/bootstrap-3.4.1-dist/css/bootstrap.css">
<script type="text/javascript" src="<%=request.getContextPath() %>/frame/bootstrap-3.4.1-dist/js/bootstrap.js"></script>
<link type="text/css" rel="stylesheet" href="css/common.css">
</head>
<style type="text/css">
	body{
		background-image: url("images/background.jpg");
		overflow: hidden;
	}
	.login-div{
		background: rgba(217, 237, 247);
		width: 600px;
		box-sizing: border-box;
		margin: 0px auto;
		padding: 20px 40px;
	}
	.login-title{
		text-align: center;
		font-size: 30px;
	}
	.form-item{
		box-sizing: border-box;
		width: 100%;
		height: 35px;
		margin-top: 15px;
		padding: 0px 5px;
	}
</style>
<body>
	<%
	Object loginUser = request.getSession().getAttribute("user");
	if (loginUser == null) {
		response.sendRedirect(request.getContextPath()+"/login.jsp");
		return;
	}
	%>
	<div class="head">
		<div class="head-content">
			<h2>小彭租车！</h2>
			<a href="admin.jsp">首页</a>

			<a href="adminUserList.jsp">用户管理</a>
			<a href="logout">退出</a>
		</div>
	</div>
	<div class="main">
		<div class="main-content" style="text-align: center;">
			<form action="<%=request.getContextPath() %>/carList/add" method="post">
				<h1>添加汽车</h1>
				<table >
					<tr>
						<td>型号</td>
						<td>
							<input class="form-control" style="width: 400px;" name="model" type="text" required="required">
						</td>
					</tr>
					<tr>
						<td>数量</td>
						<td>
							<input class="form-control" style="width: 400px;" name="number" type="number" required="required">
						</td>
					</tr>
					<tr>
						<td>单价</td>
						<td>
							<input class="form-control" style="width: 400px;" name="price" type="text" required="required">
						</td>
					</tr>
					<tr>
						<td colspan="2">
							<button class="select-button btn btn-success">添加</button>
						</td>
					</tr>
				</table>
			</form>
		</div>
	</div>
</body>
</html>